cssjshtml vue.js 这是一个干净的脚手架项目

葫芦的运维日志

下一篇 搜索 上一篇

浏览量 3865

2019/01/06 22:42


    访问顺序  index.html --> main.js -- App.vue.

1.main.js

// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'

Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  el: '#app',
  components: { App },
  template: '<App/>'
})
//   index.html --> main.js -- App.vue

2.App.vue

<!-- 1模板:html结构 -->
<template>
  <div id="app">
    <h1> {{ title }} </h1>
  </div>
</template>

<!-- 2行为:逻辑处理 -->
<script>
export default {
  name: 'App',
  data(){
  return{
  title:"这是一个干净的脚手架项目!"
  }
  }
}
</script>

<!-- 3样式:解决样式 -->
<style>

</style>

 

 

葫芦的运维日志

打赏

上一篇 搜索 下一篇
© 冰糖葫芦甜(bthlt.com) 2021 王梓打赏联系方式 陕ICP备17005322号-1